<?php

class m131104_043444_oak extends CDbMigration
{
	public function safeUp()
	{
        $sql = 'CREATE TABLE `{{thumbnail}}`
                (
                    `id` tinyint PRIMARY KEY,
                    `name` varchar(255),
                    `width` smallint,
                    `height` smallint,
                    `created_at` datetime,
                    `updated_at` datetime
                )
                ENGINE=InnoDB DEFAULT CHARSET=utf8;
                
                INSERT INTO `{{thumbnail}}` VALUES(1, "80x80", 50, 50, NOW(), NOW());
                INSERT INTO `{{thumbnail}}` VALUES(2, "250x250", 100, 100, NOW(), NOW());';

        $this->execute($sql);
	}
    
    public function safeDown()
    {
        return false;
    }
}